package com.gonsin.gmessage.example.sender;

import com.gonsin.gmessage.annotations.GArgsBody;
import com.gonsin.gmessage.annotations.GZoom;
import com.gonsin.gmessage.annotations.GArgsParam;
import com.gonsin.gmessage.annotations.enums.ZoomDescribe;
import com.gonsin.gmessage.example.po.I30000VersionBo;
import com.gonsin.gmessage.example.po.S10000NStatusDto;
import com.gonsin.gmessage.example.po.S30000UnitPo;
import com.gonsin.gmessage.logic.GMessage;
import com.gonsin.gmessage.annotations.GSender;
import com.gonsin.gmessage.example.po.TestMessagePo;

import java.util.List;

@GMessage(firstCmd = "test", note = "测试用的消息")
public interface DemoSender {

    /**
     * 向域=${roomKey}的区域发送消息
     */
    @GSender(subCmd = "sub_test", note = "消息发送", summary = "详细说明，接口的内容<font color=\"red\" >支持用html标签实现简单样式（markdown自带）</font>")
    boolean sendTest(@GZoom String roomKey,
                  @GArgsParam(value = "message", note = "消息") TestMessagePo message,
                  @GArgsParam(value = "sender", note = "发送人", demo = "邓某") String sender);

    /**
     * 向域=${roomKey}的区域发送消息
     */
    @GSender(subCmd = "sub_test", note = "消息发送", summary = "详细说明，接口的内容<font color=\"red\" >支持用html标签实现简单样式（markdown自带）</font>", zoomDescribe = ZoomDescribe.ALL)
    void sendTest(
            @GZoom String roomKey,
            @GArgsParam(value = "message", note = "消息") TestMessagePo message,
            @GArgsParam(value = "sender", note = "发送人", demo = "邓某") String sender,
            @GArgsParam(value = "number", note = "数字", demo = "邓某") int number);


    /**
     * 话筒开关咪状态变更
     *
     * @param roomKey            会议室主键KEY
     * @param micStateChangeList 数据有变化的单元
     */
    @GSender(subCmd = "mic_state", note = "话筒上下线状态变更（会议室级别）")
    void sendMicState(@GZoom String roomKey,
                      @GArgsParam(value = "testList", note = "测试字符串数组") List<String> testList,
                      @GArgsParam(value = "unit_tl", note = "发言模式（具体查看枚举 micMode）") List<S30000UnitPo> micStateChangeList);


    /**
     * 通知所有30000版本更新
     *
     * @param version30000
     */
    @GSender(subCmd = "version", note = "版本更新", zoomDescribe = ZoomDescribe.ALL)
    void sendMicVersion(@GArgsBody I30000VersionBo version30000);

    @GSender(subCmd = "number", note = "xxx", zoomDescribe = ZoomDescribe.ALL)
    void sendNumberTest(@GArgsParam(value = "obj", note = "x") S10000NStatusDto str);
}
